home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 5
/
Aminet 5 - March 1995.iso
/
Aminet
/
util
/
cli
/
MayFlower.lha
/
MayFlower
/
ASR
/
ASR.doc
< prev
next >
Wrap
Text File
|
1994-05-12
|
27KB
|
596 lines
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Announce System Requests
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Alias: ASR
Copyright © 1991 Stephen D. Childers
Version Number: 19940301 (1 Mar 1994)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Announce System Requests Page i-01
Table of Contents
-----------------------
Chapters:
Program Author ................................ Page A-01
Program Description ........................... Page A-02
CLI Usage ..................................... Page A-03
CLI Examples .................................. Page A-04
Workbench Usage ............................... Page A-05
Program Messages and Errors ................... Page A-06
How To Make Extra PROJECT Icons................ Page A-07
Operational Notes ............................. Page A-08
Programmer's Notes ............................ Page A-09
Version History................................ Page A-10
<XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX>
Program Author: Page A-01
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Address:
--- ---
Stephen D. Childers (o) (o)
2302 West Vesper Street ^
Blue Springs, Missouri 64015 \_____/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
/ \
/ \
/ 12 Therefore all things whatsoever ye would that men \
/ should do to you, do ye even so to them: for this is the law \
\ and the prophets. /
\ /
\ The King James Holy Bible - Matthew 7:12 /
\ /
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\
/X__XX__XX__XX__XX__XX__XX__XX__XX__XX__XX__XX__XX__XX__XX__X\
// \\
// \\
X 23 For the wages of sin is death; but the gift of God X
X is eternal life through Jesus Christ our Lord. X
X X
\\ The King James Holy Bible - Romans 6:23 //
\\ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ //
\X XX XX XX XX XX XX XX XX XX XX XX XX XX XX X/
\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
/ \
/ \
/ 16 For I am not ashamed of the gospel of Christ: for \
/ it is the power of God unto salvation to every one that \
\ believeth; to the Jew first, and also to the Greek. /
\ /
\ The King James Holy Bible - Romans 1:16 /
\ /
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
<XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX>
Program Description: Page A-02
1) The main purpose of this program is to cause an audible noise
to be made when a System Request (henceforth referenced as SR)
pops up on the screen. This is useful if you plan to be away,
but not very far, from your computer system.
This will then allow you to do other things like read and
study your software books (or snooze) while your Amiga works.
And should a certain type of SR happen you will then be alerted
by an audible noise generated by your Amiga.
A good example of a possible SR event could be:
Your Amiga gets a transient Read/Write error with your Hard Drive
while compiling hundreds of 'C' source code files... <HORRORS> !!
(Lattice C by the way)
This is better than having your Amiga idle QUIETLY while it waits
for you to notice an SR event that needed a decision an HOUR AGO !
2) Can be used from CLI or Workbench. Can be made resident, but the
only benefit of making it resident is to bypass loading time when
program is invoked.
3) Process will increase its own priority by 7.
4) The program title "Announce System Requests" will be shortened
to an acronym and henceforth referenced as "ASR".
5) After ASR is installed it will WAIT in an idle state until
activated by any program that causes a SR to pop up on the
screen. After ASR activates it will then cause some type of
audible noise to be made which will then bring your attention
back to the computer.
The noise that ASR generates will depend upon the options you
set. The noise may be generated by the SPEAK DEVICE mode, or by
the COMMAND LINE mode. These modes are explained in detail
elsewhere in this document.
6) ASR needs the SPEAK: device mounted for announcing its startup
and its ending. The SPEAK: device will look for the
"translator.library" and the "narrator.device".
7) It is alright for you to respond to any SR before the announcement
ends without disrupting the system, but this will also depend upon
the type of noise program that you give ASR to launch. ASR may not
announce all of the SR text if you respond rather quickly to an SR.
It may be possible for the ASR program to miss an announcement
if more than one SR pops up within moments of each other. The
text that you hear from SPEAK: may also sound strange.
8) ASR can be used with the "Cancel System Requests" (CSR) program.
This will allow you to hear any SR as it is automatically canceled.
9) ASR will install itself only once.
10) Invoking ASR with option -i from CLI will cause ASR to completely
detach from the CLI and run as a background process.
If the background process should fail then it will attempt to
notify you of that fact with a SR.
<XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX>
CLI Usage: Page A-03
> ASR !|?|-options ["COMMAND LINE string or SPEAK DEVICE options"]
Description of -options:
Option 'G' (Gadgets text announced)
1) This will cause the text within the SR gadgets to be
announced. This only works in SPEAK DEVICE mode.
2) The announcement of gadgets will sound something like this:
"Positive choice is " + <text of left gadget>
"Negative choice is " + <text of right gadget>
All System Requests will have at least one gadget.
Option 'I' (Install)
1) This installs the ASR code. If used alone (ie "ASR -i")
it will cause internal SPEAK DEVICE mode and string to be
used. This option causes ASR to detach from CLI.
ASR will announce the following when installing:
"Installing Announce System Requests"
Option 'C' (COMMAND LINE mode)
1) This may be used in conjunction with the 'I' option and
this puts ASR into the COMMAND LINE mode.
2) The COMMAND LINE string may be any CLI command that can be
typed from CLI, though you should use only commands which
generate some type of audible noise (or musick) for a few
moments and then quit. This COMMAND LINE string with its
options must be within quotes.
3) Command must exist along search path or ASR does nothing.
4) You should supply a COMMAND LINE string with this option or
else the internal SPEAK DEVICE mode becomes the default.
Option 'S' (SPEAK DEVICE mode)
1) This may be used in conjunction with the 'I' option and this
puts ASR into the SPEAK DEVICE mode.
2) Using the 'S' option without a SPEAK DEVICE string will cause
the internal SPEAK: string parameter to be used.
The internal default SPEAK: string is "opt/m/p80/s170"
Option 'Q' (Quiet)
1) This will cause the ASR process to keep quiet with reference
to its process messages. No messages will be displayed.
Option 'R' (Remove)
1) This will send the remove signal to the ASR process.
2) The ASR process will not remove itself if any SR is pending
a user's decision.
3) If ASR successfully detects the remove signal it will
announce the following:
"Removing Announce System Requests"
<XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX>
CLI Examples: Page A-04
To see for yourself what the program can do then type the following
examples from CLI.
(take notice of "quotes" within examples)
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
; EXAMPLE 1, install COMMAND LINE mode
CLI > ASR -ic "Say -m -p100 -s170 Yo, programmer, Guess what."
CLI > cd OopsDisk:
; Now cancel the SR before typing next line.
; You MUST always remove the OLD announcement before
; installing a NEW announcement.
CLI > ASR -r ; Remove ASR from system.
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
; EXAMPLE 2, install COMMAND LINE mode (general announcement)
CLI > ASR -ic "Say -p65 -s200 System Request."
CLI > cd KickWork:
; Cancel SR before typing next line.
CLI > ASR -r
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
; EXAMPLE 3, install SPEAK DEVICE mode
CLI > ASR -isg "opt/f/p270/s170"
CLI > cd "Letters ...:"
; Cancel SR before typing next line.
CLI > ASR -r
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
; EXAMPLE 4, install SPEAK DEVICE mode (with default options)
CLI > ASR -isg
CLI > cd "Lattiss C:"
; Cancel SR before typing next line.
CLI > ASR -r
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
; EXAMPLE 5, Try the "Beep" program which you should find with this
; program package.
CLI > ASR -ic "Beep -D10 -F300 -V64 -Q"
CLI > cd "Any Disk:"
; Cancel SR before typing next line.
CLI > ASR -r ; remove ASR when no longer needed.
<XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX>
Workbench Usage: Page A-05
You may set the TOOL TYPES using the Workbench INFO menu choice.
The TOOL TYPES available are:
1) COMMAND=
This causes the COMMAND LINE mode to take effect when filled
in. You set this to whatever COMMAND LINE string you desire,
as explained in the CLI examples, except with Workbench you
MUST specifically indicate where the command exists else no
sound will happen.
Leaving the 'COMMAND' TOOL TYPE in a NULL condition as shown
in above without any thing after the equal sign will cause the
SPEAK DEVICE mode to be chosen. In other words; the 'COMMAND'
TOOL TYPE takes precedence over the 'SPEAK' TOOL TYPE.
An example: COMMAND=Run DF1:Sound/Beep -d7 -f400
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Notice that the path indicates that "Beep" resides on
drive "DF1:" and inside a directory named "Sound".
2) SPEAK=
You set this to the parameters you wish the SPEAK DEVICE mode
to use when announcing texts through the 'SPEAK:' device.
Leaving the 'SPEAK' TOOL TYPE as shown in the above line
without any thing after the equal sign will cause the
internal SPEAK parameters to be used.
The internal default SPEAK string is "opt/m/p80/s170"
An example: SPEAK=opt/f/p240/s200
~~~~~~~~~~~~~~~~~~~~~
3) SPEAK TEXT INSIDE GADGETS=
A 'Yes' after the equal sign causes SR gadget texts to
be announced. A 'No' or NULL after the equal sign causes
gadget texts to be skipped. The default is 'No'.
This will only take effect when SPEAK DEVICE mode is chosen.
An example: SPEAK TEXT INSIDE GADGETS=yes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4) ICON IS TOGGLE=
A 'Yes' after the equal sign will cause the ASR icon to act
as a toggle switch when chosen, meaning; if ASR was installed
then it will be removed, if ASR was not installed it will be
installed. The default is 'No'.
A 'No' after the equal sign will cause a SR to appear whenever
the icon is accessed from Workbench.
If ASR is not installed you will see following SR gadgets:
"Install" or "Cancel"
If ASR is installed you will see the following SR gadgets:
"Remove" or "Cancel"
An example: ICON IS TOGGLE=no
~~~~~~~~~~~~~~~~~
<XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX>
Program Messages and Errors: Page A-06
Messages possible are:
1: "Busy with System Requests"
This means that another ASR process has a SR pending a
user's decision.
2: "Already installed"
Option '-i' will cause this when ASR has already been
installed and is ready to work. Only one ASR process is
allowed to be installed and ready.
3: "Already removed"
Option '-r' will cause this if the ASR process is not
installed.
4: "Unable to remove, library vector is altered"
Options '-r' will cause this if the library pointers
associated with creating a SR are altered by another process,
and ASR will not remove itself until those library pointers
are restored to the value that were present when ASR was
installed.
5: "Sent signal to remove code"
Option '-r' will cause this if ASR is installed and is
capable of being removed (see also note 1 & 4 above).
NOTE 1: You will not see this message if ASR is de-activated
from Workbench.
NOTE 2: When the ASR process detects this signal and no
restrictions are detected (see note 1 & 4 above)
then it will remove itself and then it will
SPEAK: "Removing Announce System Requests"
Errors possible are:
1: "Unmatched quotes" (seen in CLI only)
2: "Null arguments not allowed" (seen in CLI only)
3: "Unable to allocate memory"
4: "Unable to open dos.library" (seen in Workbench only)
5: "Unable to open intuition.library" (seen in CLI only)
6: "Unable to open icon.library"
7: "Unable to open NIL:"
8: "Unable to open SPEAK:"
9: "Unable to execute background command >" (seen in CLI only)
Background process failed in some manner.
<XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX>
How To Make Extra ASR PROJECT Icons: Page A-07
Just for your general information, the icon for this version of
ASR is a PROJECT type icon. The first version of ASR used a TOOL
type icon.
The following paragraphs will explain how to make and set the
TOOL TYPES of several ASR PROJECT icons. Pre-setting several project
icons this way will allow Workbench users to easily change the types
of sounds they want to hear between different computing projects,
otherwise you would have to access the Workbench INFO menu choice each
time you desired to change the sounds generated by ASR while working
from Workbench. I found that to be a pain, so I decided that setting
up several project icons with different TOOL TYPE settings would be
a better method.
There are four pre-set PROJECT icons included with this version of ASR.
The following steps explain how I made the ASR-Beep.info project icon
along with a dummy text file to go along with it. You may follow
these steps to make and name your own project icons:
Step 1: Clone (copy) the "ASR.info" file to a new name. Make sure
the new name represents the type of noise or sound that ASR
will generate when activated by this new project icon.
(ie; "ASR-Beep.info" is a clone of "ASR.info").
Step 2: Edit a dummy text file to go along with the new ".info" file.
The name of the dummy text file should be the same as the
new file but without the ".info" extension.
(ie; "ASR-Beep" is the dummy text for "ASR-Beep.info")
The dummy text file can be empty or filled with various notes,
it does not matter what the contents are.
NOTE: Workbench HAS to see the NAME of the dummy text file or
the information about the "ASR-Beep.info" PROJECT icon will
not get passed to ASR.
Step 3: Choose the "ASR-Beep.info" icon from Workbench and then select
the INFO menu choice.
Step 4: Choose the DEFAULT TOOL input line and type in the
<root/directory/name> of where the ASR program will be kept
on your system.
Step 5: Set the TOOL TYPE parameters; read page A-06 for settings
availble.
Step 6: Click the Save gadget of the Workbench INFO window, and put
the project icon where it is needed.
<XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX>
Operational Notes: Page A-08
The following operational notes are from the author's own
experience while using the ASR program with Workbench 1.3 version.
1) It is rare for the ASR process to miss a remove signal, but
if it does then try again. I am not sure what causes this to
happen when it does.
2) The following has happened a few times:
The ASR process failed to install itself and did not give any
indication of failure except that it did NOT announce its
startup.
This happened to me while copying files to a disk drive and
trying to install ASR at the same time. I Have no idea as to
why it failed in this manner.
If this happens to you then do an "ASR -r" and try installing
again.
<XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX>
Programmer's Notes: Page A-09
The SPEAK DEVICE mode may not announce every SR properly, it depends
upon how other program authors have set up the various parameters
needed by the ROM functions that are used in creating the SR.
If you want to hear a surprise then make sure you set ASR to the
SPEAK DEVICE mode (ie "ASR -ig"), and then go to your System drawer
and double-click on the DiskCopy icon (for Workbench v1.3). After ASR
is done announcing the SR for DiskCopy then double-click the Format
icon and then compare the two announcements for yourself.
It was somewhat of a surprise when I first heard the announcement
of the SR for DiskCopy. My first thought was to wonder what was wrong
with my source code, but I quickly realized that there was nothing
wrong with my code because the SR announced properly for other
programs (ie Format).
There are various ROM routines that programmers can use in creating
the SR. One of those ROM routines is called "AutoRequest", another
routine is called "BuildSysRequest", and programs that make calls to
these functions with their "IntuiText.NextText" structures in reverse
order will cause them to be heard out of sync when announced by ASR
(as is the case with DiskCopy (Workbench 1.3)). IntuiText structures
like this WILL print in correct order within the SR window, but they
WILL NOT be announced in sequence as displayed and will sound odd.
All that needs to be done to a program like DiskCopy is for its
author(s) to reverse the order of the "IntuiText.NextText" pointers
within the IntuiText structures, and then call the proper IntuiText
structure, and then ASR will be able to announce them in proper order.
DiskCopy (from Workbench V1.3) is the only program that I have found
to do this.
<XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX>
Version History: Page A-10
The following information describes changes or improvements made to
each version, and they will be described in descending order;
meaning latest version information begins first:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Version 5.0 (19940301) -
1) Changed version numbering format. Program can now be used with
the "Version" command. Date within parenthesis is shown in a
somewhat international format as (yyyymmdd).
2) Added some aesthetics to part of announcement logic.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Version 19930810 -
1) Program has been modified to work with Workbench 1.3 and Workbench
2.05 systems, and should also work with higher Workbench versions,
but program will now work somewhat differently on Workbench
versions higher than 1.3 as explained in the following lines:
This program may (when used on Workbench versions higher than 1.3)
only announce the presence of a System Request and will not announce
the text lines within the request nor the text within the gadgets
regardless of option settings. This operation will depend upon how
program authors design their programs.
2) ASR will mount SPEAK: device.
NOTE: If SPEAK device is already mounted then typing "Mount speak:"
from CLI on Workbench 2.05 version will cause the system to
lose 24 bytes each time it is typed, therefore, ASR will
appear to lose 24 bytes for each time it begins a new
announce process, but only after the ASR process has been
previously removed; I hope this note made sense to you.
3) Removed a crashing problem that only showed up when some one would
continuously click the mousey button over the ASR icon, thereby
spawning several ASR processes somewhat simultaneously.
Why would any one do that for ?? <smile>
[clickity clickity clicky click; clickity clickity clicky crash]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Version 19920716 -
1) Removed a strange CLI parsing problem which appeared when the
LENGTH of the command line was at certain lengths. But, under some
CLI operating conditions the problem did not appear, and any command
line length would work. This problem, when it happens, causes the
error "Argument error" to appear whether program arguments are
legitimate or not. Any CLI line length should now work properly.
2) ASR can be used with the "Cancel System Requests" (CSR) program.
This will allow users to hear the System Requests as they are being
automatically canceled. The CSR program must be run first before
running the ASR program.
ie > CSR -dw ; links CSR code in first
> ASR -ig ; links ASR code after CSR
3) This version of ASR will allow only one installation of its code.
Previous ASR versions would allow users to install the ASR code a
multiple of times depending upon the use of other programs.
In example, performing the following steps while using CSR
(version 19910828) and ASR (version 19910902) would install the
ASR code each time program was invoked:
ie > CSR i ; 1st copy of CSR code installed in memory
> run ASR -ig ; 1st copy of ASR code installed in memory
> CSR i ; 2nd copy of CSR code installed in memory
> run ASR -ig ; 2nd copy of ASR code installed in memory
> CSR i ; 3rd copy of CSR code installed in memory
> run ASR -ig ; 3rd copy of ASR code installed in memory
This can no longer happen with new versions of ASR or CSR.
4) Process will increase its own priority by 7.
5) Program can be made resident, but the only benefit of making it
resident is to bypass loading time when program is invoked.
6) Invoking ASR with option -i from CLI will cause ASR to completely
detach from the CLI and run as a background process.
If the background process should fail then it will attempt to
notify you of that fact with a System Request.
7) See "Workbench usage:" item 4 for change in SR gadget operation.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Version 19910902 -
1) Added TOOL TYPES for Workbench access.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Version 19910612 - The first version.
<XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX>
End Of User Documentation